package com.turing.post.organization.util;

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author zxp
 * @date 2012-12-14
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "SALEBRANCH")
public class SaleBranch implements java.io.Serializable {

	/**
	 * 预存款下限 默认0
	 */
	public static final Integer SALEBRANCH_CREDITLOWLIMIT = 0;
	/**
	 * 销售机构号
	 */
	private String saleBranchNo;
	/**
	 * 上级机构号
	 */
	private String superSaleBranchNo;

	/**
	 * 默认备付金账户
	 */
	private BigInteger bankAccountId;
	/**
	 * 销售机构名称
	 */
	private String saleBranchName;
	/**
	 * 激活状态 0 – 未激活
	 */
	public static final String SALEBRANCH_STATUS_NOTACTIVATED = "0";

	/**
	 * 激活状态 1 – 已激活
	 */
	public static final String SALEBRANCH_STATUS_ACTIVATED = "1";
	/**
	 * 0–未激活 1–已激活
	 */
	private String status;
	/**
	 * 发卡机构号
	 */
	private String issueBranchNo;
	/**
	 * 行政区域
	 */
	private String regionNo;
	/**
	 * 收益归属ID
	 */
	private BigInteger incomeBranchId;
	/**
	 * 预存款下限
	 */
	private BigInteger creditLowLimit;
	/**
	 * 上日信用度
	 */
	private BigInteger lastCredit;
	/**
	 * 当前信用度
	 */
	private BigInteger credit;
	/**
	 * 上日现金余额
	 */
	private BigInteger lastCash;
	/**
	 * 当前现金余额
	 */
	private BigInteger cash;

	/**
	 * 代理销售到期日
	 */
	private Date expired;
	// 销售机构类型
	/**
	 * 7 代理机构
	 */
	public static final String SaleBranch_SaleType_Proxy = "7";

	/**
	 * 销售类型
	 */
	private String saleType;
	/**
	 * 地址
	 */
	private String address;
	/**
	 * 联系电话
	 */
	private String linkTele;
	/**
	 * 联系人
	 */
	private String linkMan;

	private BigInteger alreadyCheckCash;// 已核实未激活现金余额 只含有销售款和充值款，不含手续费
	private BigInteger lastCashFee; // 上次已减手续费之和
	private Date lastCashFeeDate;// 上次已减收付费账务日期 Null

	/**
	 * 0-正常(默认)
	 */
	public static final String Not_DayOff = "0";
	/**
	 * 1-销售机构日结，日结后禁止办理业务
	 */
	public static final String In_DayOff = "1";
	private String dayOff;// 日终状态 Char(1)

	public SaleBranch() {

	}

	@Id
	@Column(name = "SALEBRANCHNO")
	public String getSaleBranchNo() {
		return saleBranchNo;
	}

	public void setSaleBranchNo(String saleBranchNo) {
		this.saleBranchNo = saleBranchNo;
	}

	@Column(name = "SUPERSALEBRANCHNO")
	public String getSuperSaleBranchNo() {
		return superSaleBranchNo;
	}

	public void setSuperSaleBranchNo(String superSaleBranchNo) {
		this.superSaleBranchNo = superSaleBranchNo;
	}

	@Column(name = "bankAccountId")
	public BigInteger getBankAccountId() {
		return bankAccountId;
	}

	public void setBankAccountId(BigInteger bankAccountId) {
		this.bankAccountId = bankAccountId;
	}

	@Column(name = "SaleBranchName")
	public String getSaleBranchName() {
		return saleBranchName;
	}

	public void setSaleBranchName(String saleBranchName) {
		this.saleBranchName = saleBranchName;
	}

	@Column(name = "status")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "CREDITLOWLIMIT")
	public BigInteger getCreditLowLimit() {
		return creditLowLimit;
	}

	public void setCreditLowLimit(BigInteger creditLowLimit) {
		this.creditLowLimit = creditLowLimit;
	}

	@Column(name = "LASTCREDIT")
	public BigInteger getLastCredit() {
		return lastCredit;
	}

	public void setLastCredit(BigInteger lastCredit) {
		this.lastCredit = lastCredit;
	}

	@Column(name = "CREDIT")
	public BigInteger getCredit() {
		return credit;
	}

	public void setCredit(BigInteger credit) {
		this.credit = credit;
	}

	@Column(name = "LASTCASH")
	public BigInteger getLastCash() {
		return lastCash;
	}

	public void setLastCash(BigInteger lastCash) {
		this.lastCash = lastCash;
	}

	@Column(name = "CASH")
	public BigInteger getCash() {
		return cash;
	}

	public void setCash(BigInteger cash) {
		this.cash = cash;
	}

	@Column(name = "ADDRESS")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "LINKTELE")
	public String getLinkTele() {
		return linkTele;
	}

	public void setLinkTele(String linkTele) {
		this.linkTele = linkTele;
	}

	@Column(name = "LINKMAN")
	public String getLinkMan() {
		return linkMan;
	}

	public void setLinkMan(String linkMan) {
		this.linkMan = linkMan;
	}

	@Column(name = "IssueBranchNo")
	public String getIssueBranchNo() {
		return issueBranchNo;
	}

	public void setIssueBranchNo(String issueBranchNo) {
		this.issueBranchNo = issueBranchNo;
	}

	@Column(name = "REGIONNO")
	public String getRegionNo() {
		return regionNo;
	}

	public void setRegionNo(String regionNo) {
		this.regionNo = regionNo;
	}

	@Column(name = "INCOMEBRANCHID")
	public BigInteger getIncomeBranchId() {
		return incomeBranchId;
	}

	public void setIncomeBranchId(BigInteger incomeBranchId) {
		this.incomeBranchId = incomeBranchId;
	}

	@Column(name = "expired")
	public Date getExpired() {
		return expired;
	}

	public void setExpired(Date expired) {
		this.expired = expired;
	}

	@Column(name = "saleType")
	public String getSaleType() {
		return saleType;
	}

	public void setSaleType(String saleType) {
		this.saleType = saleType;
	}

	@Column(name = "alreadyCheckCash")
	public BigInteger getAlreadyCheckCash() {
		return alreadyCheckCash;
	}

	public void setAlreadyCheckCash(BigInteger alreadyCheckCash) {
		this.alreadyCheckCash = alreadyCheckCash;
	}

	@Column(name = "lastCashFee")
	public BigInteger getLastCashFee() {
		return lastCashFee;
	}

	public void setLastCashFee(BigInteger lastCashFee) {
		this.lastCashFee = lastCashFee;
	}

	@Column(name = "lastCashFeeDate")
	public Date getLastCashFeeDate() {
		return lastCashFeeDate;
	}

	public void setLastCashFeeDate(Date lastCashFeeDate) {
		this.lastCashFeeDate = lastCashFeeDate;
	}

	@Column(name = "dayOff")
	public String getDayOff() {
		return dayOff;
	}

	public void setDayOff(String dayOff) {
		this.dayOff = dayOff;
	}
}